<!--
 * @Author: vectorwings
 * @Email: vectorwings@163.com
 * @GitHub: https://github.com/vector-wings/
 * @Company: Copyright 2019 HuaZhuTech, Inc.
 * @Date: 2019-10-25 15:04:13
 * @LastEditors: vectorwings
 * @LastEditTime: 2019-10-28 09:34:31
 * @Description: 任务台账-详情页面-检查内容
 -->

<template>
  <section class="card">
		<div class="header">检查项： {{tableList.itemCount || '---'}}项; 检查内容：{{tableList.itemContentCount || '---'}}个</div>
		<div style="height: 0.06rem;"></div>
    <table border="1" bordercolor="#D9D9D9" class="table" v-for="(item, i) in tableList.tableList" :key="i">
			<thead>
				<tr>
					<!--<th v-for="(th, th_i) in tableList.tableList" :key="th_i">{{th.name}}</th>-->
					<th>检查项</th>
					<th>检查内容</th>
				</tr>
			</thead>
			<tbody v-for="(item_child, ic_i) in item.itemContentList" :key="ic_i" >
				<tr  v-for="(item_childs, ic_i) in item_child.contentList" :key="ic_i">
					<td v-if="ic_i === 0" :rowspan="item_child.contentList.length">{{item_child.item}}</td>
					<td>{{item_childs.contentName}}</td>
				</tr>
			</tbody>
    </table>
  </section>
</template>

<script>
import { AvatarName } from "../../../../../components/widgets";
export default {
  name: "InspectionRecordContent",
  components: {
    AvatarName
  },
	props: {
		tableHead: Array,
		tableData: Array,
    tableList:Object
	},
    created () {
        // console.log(this.tableList);
    }
};
</script>

<style lang="scss" scoped>
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  padding: 0.07rem;
  .header {
    font-size: 0.16rem;
    font-weight: 500;
  }
  .table {
    margin:0.12rem 0 ;
    background:rgba(255,255,255,1);
    box-shadow:0px 2px 8px 0px rgba(182,182,182,0.4);
    thead {
      text-align: center;
      font-size: 0.14rem;

      th{
        text-align: center;
        padding:0.05rem;
        font-size:0.11rem;
        font-family:PingFangSC-Regular,PingFang SC;
        font-weight:400;
        color:rgba(61,61,61,1);
        line-height:0.16rem;
      }
      tr th:nth-child(1) {
        width: 30%;
        font-weight: bold;
        font-size: 0.13rem;
        padding:0.1rem 0.2rem;
      }
      tr th:nth-child(2) {
        font-weight: bold;
        font-size: 0.13rem;
        padding:0.1rem 0.2rem;
      }
    }
    td {
      text-align: center;
      padding:0.05rem;
      font-size:0.1rem;
      font-family:PingFangSC-Regular,PingFang SC;
      font-weight:400;
      color:rgba(61,61,61,1);
      line-height:0.16rem;
    }
  }
}
</style>
